<?php
/**
 * log日志
 * @author fyl
 * Date: 16-4-12
 */

class LogService extends BaseService
{
    private static $self = NULL;
    private $mLog      =  NULL;

    public function __construct()
    {
        $this->mLog =   new Involved_LogModel();

    }
    static public function instance()
    {
        if (self::$self == NULL) {
            self::$self = new self;
        }

        return self::$self;
    }

    public function write($aData)
    {
        $aData['created']  = time();
        $aData['operator'] = session_get(UserEnum::ADMIN_USER_KEY)->id;
        return  $this->mLog->insert($aData);

    }

}
?>